package cn.tedu.antcolony.market.dao.persist.mapper;


import cn.tedu.antcolony.market.pojo.entity.Clue;
import cn.tedu.antcolony.market.pojo.vo.ClueListItemVO;
import cn.tedu.antcolony.market.pojo.vo.ClueStandardVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ClueMapper extends BaseMapper<Clue> {
    //批量插入线索
    int insertBatch(List<Clue> clueList);

    //根据id查询线索
    ClueStandardVO getStandardByClueId(Long id);

    //根据id查询公海
    ClueStandardVO getStandardByCustomerSeaId(Long id);

    //线索展示
    List<ClueListItemVO> listClue();

    //公海展示
    List<ClueListItemVO> listCustomerSea();

    //线索公海展示
    List<ClueListItemVO> list();

    //修改归属人
    int changeAttribution(Long id, String name);

    //线索状态码0到1转公海
    int transformToSeaById(Long id);

    //删除归属人
    int deleteAttribution(Long id);


    //公海状态码1到0转线索
    int transformToClueById(Long id);

    //领取公海修改归属人
    int pickCustomerSea(Long id,String name);

    //分配公海修改归属人
    int distributeCustomerSea(Long id,String name);
}
